<?php

if (!defined('MOODLE_INTERNAL')) {
    die('Direct access to this script is forbidden.');
}

global $CFG;
require_once($CFG->dirroot . '/blocks/formal_langs/scaners.php');

class block_formal_langs_scaners_test extends UnitTestCase {

    public function test_scaner_constructor() {
        global $CFG;
        $lexer_rules = file_get_contents($CFG->dirroot . '/blocks/formal_langs/simpletest/test_lexer_rus.txt');
        $this->assertNotNull($lexer_rules);
        $common_lexer = new block_formal_langs_scaner($lexer_rules);
        $this->assertNotNull($common_lexer);
        $this->assertIsA($common_lexer, 'block_formal_langs_scaner');
    }

}
 ?>